package com.jmars.TS.entity;

import java.util.Date;

/**
 * @Author: whd
 * @DateTime: 2024/12/23 15:59
 * @title: 接口公共参数
 * @msg:
 */
public class PublicParams {
    private static final long serialVersionUID = 1L;


    public String companyCd;        // 公司编码
    public String timestamp;        // 格式化时间
    public String signature;        // 加密的值
    public String apiService;       // 调用的服务接口
    public String body;             // 请求服务的接口body

    public String getCompanyCd() {
        return companyCd;
    }

    public void setCompanyCd(String companyCd) {
        this.companyCd = companyCd;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getApiService() {
        return apiService;
    }

    public void setApiService(String apiService) {
        this.apiService = apiService;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return "ApiNribParams{" +
                "companyCd='" + companyCd + '\'' +
                ", timestamp='" + timestamp + '\'' +
                ", signature='" + signature + '\'' +
                ", apiService='" + apiService + '\'' +
                ", body='" + body + '\'' +
                '}';
    }

    // 辅助方法，检查字段是否为 null，如果是 null 则返回空字符串
    private String nonNull(String value) {
        return value != null ? value : "";
    }
}
